<?php
/**
 * User: Hunman
 * Date: 20.07.13
 * Time: 12:52
 */
class Controller_Search extends Controller_Default
{
    function __construct()
    {
        $this->getQueryResult();
    }

    private function getQueryResult()
    {
        $query = $_GET["search"];

        $model = new Model_Search();
        $result = $model->getSearchData($query);

        $view = new View_Search();
        $view->pageContent = $result;
        
        $this->view = $view->view();

        $this->render("mainPage.twig");
    }

}